home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / pcpil / sample9.pil < prev    next >
Text File  |  1985-09-17  |  1KB  |  62 lines

  1. r: sprite demo
  2. dx:pict$(2200),x$(2218)
  3. fx:sample9.sqz
  4. fi:0,pict$
  5. fx:sample9.spr
  6. fi:0,x$
  7. ts:m5;e0
  8. v:pict$
  9.  
  10. r: scale x and y so one turtle move = one pixel
  11. g:x4;y4
  12.  
  13. r:draw planet and ship first time
  14. g:sx$;g0,0;s13;h90;g40,130;s7
  15.  
  16. r:move comet across screen
  17. W:20
  18. r:since sprites can only move 4 pixels at a time setting a forward step
  19. r:size of less than four actually produces a delay
  20. g:g0,100;s8;h90;*610(f1);s8
  21. g:g0,60;s8;*305(f2);s8
  22. r:this is the fastest the sprite can move using the smallest step size allowed
  23. g:g0,80;s8;*152(f4);s8
  24.  
  25. r:curve planet down and to right
  26. g:w90;j13;*32(f8;r1;w12)
  27. g:j7;s7;h0
  28.  
  29. r:spaceship goes up
  30. g:*8(s3;f4;w9;s3; s4;f4;w9;s4)
  31.  
  32. r:spaceship hovers
  33. g:*4(s3;w9;s3;    s4;w9;s4)
  34.  
  35. r:spaceship goes to right
  36. g:r90;*20(s3;f4;w9;s3; s4;f4;w9;s4); s4
  37.  
  38. r:planet jumps to it
  39. g:*2(j13;h270;f4;j4;h270;f12;w5;s4;s3;w5;s3;s4;w45)
  40.  
  41. r:planet chases spaceship
  42. g:*30(j13;f4; j4;f4;w5;s4;s3;w5;s3;s4)
  43.  
  44. r: spaceship goes around planet
  45. g:h20;*53(f20;r18;w5;s4;s3;w5;s3;s4)
  46.  
  47. r: ship hovers while planet moves off
  48. g:*14(s4;s3;w5;s3;s4;w5;j13;f8;r1;j4)
  49.  
  50. r: spaceship lands
  51. g:h180;f8;w5;s4;s3;w5;s3;s7
  52.  
  53. r:move comet across screen again
  54. g:g0,100;s8;h90;*610(f1);s8
  55. g:g0,60;s8;*305(f2);s8
  56. g:g0,80;s8;*152(f4);s8
  57. e:
  58. c:move=move+1
  59. j(move<10):fly
  60. w:20000
  61.  
  62.